package com.lbw.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author lbw
 * @since 2020-09-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SubjectEntity对象", description="")
public class SubjectEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "科目id")
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "科目名称")
    @TableField("subject_name")
    private String subjectName;

    @ApiModelProperty(value = "科目名称")
    @TableField("subject_pic")
    private String subjectPic;

    @ApiModelProperty(value = "学生id")
    @TableField(value = "stu_id")
    private String stuId;

    @ApiModelProperty(value = "科目类型")
    @TableField(value = "type")
    private Integer type;

    @ApiModelProperty(value = "总时长")
    @TableField(value = "all_length")
    private Double allLength;

    @ApiModelProperty(value = "已完成时长")
    @TableField(value = "complete_length")
    private Double completeLength;

    @ApiModelProperty(value = "完成比例")
    @TableField(value = "proportion")
    private Double proportion;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_date",fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createDate;

    @ApiModelProperty(value = "删除状态")
    @TableLogic
    private Integer delFlag;


}
